<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('新增平台服务')"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-service-add">
        <!--<div class="form-group">-->
            <!--<label class="col-sm-3 control-label">平台服务ID：</label>-->
            <!--<div class="col-sm-8">-->
                <!--<input name="id" class="form-control" type="text" required>-->
            <!--</div>-->
        <!--</div>-->
        <div class="form-group">
            <label class="col-sm-3 control-label">服务标题：</label>
            <div class="col-sm-8">
                <input name="serviceTitle" class="form-control" type="text" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">服务详情：</label>
            <div class="col-sm-8">
                <input name="serviceDetails" class="form-control" type="text" required>
            </div>
        </div>
        <div class="form-group">
            <!--0表示有效、1表示无效-->
            <label class="col-sm-3 control-label">状态：</label>
            <div class="col-sm-9">
                <select class="form-control" name="state">
                    <option value="0" th:checked="true">有效</option>
                    <option value="1">无效</option>
                </select>
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer"/>
<script type="text/javascript">
    var prefix = ctx + "mall/service"
    $("#form-service-add").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/add", $('#form-service-add').serialize());
        }
    }
</script>
</body>
</html>